import lombok.Data;

/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: OrganizationComponent
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2021/12/28 14:03
 * @version: 1.0
 */
@Data
public abstract class OrganizationComponent {

    //名称
    private String name;

    //说明
    private String des;


    //构造器
    public OrganizationComponent(String name, String des) {
        super();
        this.name = name;
        this.des = des;
    }

    protected void add(OrganizationComponent organizationComponent){
        //默认实现
        throw new UnsupportedOperationException();
    }

    protected void remove(OrganizationComponent organizationComponent){
        //默认实现
        throw new UnsupportedOperationException();
    }

    protected abstract void print();
}
